package com.guigusuqi.commonutils.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Configuration
@EnableTransactionManagement
@MapperScan(basePackages = {"com.guigusuqi.birthday.mapper", "com.guigusuqi.yy.mapper",
        "com.guigusuqi.app.mapper", "com.guigusuqi.hy.mapper",
        "com.guigusuqi.act.mapper", "com.guigusuqi.admin.mapper",
        "com.guigusuqi.survey.mapper","com.guigusuqi.payment.mapper"}) //mapper和service不一样,只有接口，没有实现类，所以需要进行扫描
public class MyBatisPlusConfig
{

    /**
     * 分页插件
     * @return
     */
    @Bean
    public PaginationInterceptor paginationInterceptor()
    {
        return new PaginationInterceptor();
    }
}
